public class Team {
    private int id;
    private String name;
    private int wins;         // 胜场数
    private int losses;       // 负场数
    private int setsWon;      // 胜局数
    private int setsLost;     // 负局数
    private int pointsFor;    // 总得分数
    private int pointsAgainst; // 总失分数

    public Team(int id, String name) {
        this.id = id;
        this.name = name;
        this.wins = 0;
        this.losses = 0;
        this.setsWon = 0;
        this.setsLost = 0;
        this.pointsFor = 0;
        this.pointsAgainst = 0;
    }

    // Getters and Setters
    public int getId() { return id; }
    public String getName() { return name; }
    public int getWins() { return wins; }
    public int getLosses() { return losses; }
    public int getSetsWon() { return setsWon; }
    public int getSetsLost() { return setsLost; }
    public int getPointsFor() { return pointsFor; }
    public int getPointsAgainst() { return pointsAgainst; }

    public void incrementWins() { this.wins++; }
    public void incrementLosses() { this.losses++; }
    public void incrementSetsWon(int sets) { this.setsWon += sets; }
    public void incrementSetsLost(int sets) { this.setsLost += sets; }
    public void incrementPointsFor(int points) { this.pointsFor += points; }
    public void incrementPointsAgainst(int points) { this.pointsAgainst += points; }

    // 计算局分比
    public double getSetRatio() {
        return (setsLost == 0) ? 0 : (double) setsWon / setsLost;
    }

    // 计算小分比
    public double getPointRatio() {
        return (pointsAgainst == 0) ? Double.MAX_VALUE : (double) pointsFor / pointsAgainst;
    }

}
